﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Vehiculos.aspx.cs" Inherits="InfraccionesWeb.Formularios.Vehiculos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            
            <h2>Administracion de Vehiculos</h2>
            <br />

            <br />
            <asp:GridView ID="gdwVehiculos" runat="server" 
                onrowcancelingedit="gdwVehiculos_RowCancelingEdit" 
                onrowdeleting="gdwVehiculos_RowDeleting" onrowediting="gdwVehiculos_RowEditing" 
                onrowupdating="gdwVehiculos_RowUpdating" AutoGenerateColumns="False" >
                <Columns>
                
                    <asp:TemplateField HeaderText="VIN">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtVin" runat="server" Text='<%# Bind("Vin") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("Vin") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Placa">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtPlaca" runat="server" Text='<%# Bind("Placa") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Bind("Placa") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Licencia">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtLicencia" runat="server" Text='<%# Bind("LicenciaVehiculo") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label4" runat="server" Text='<%# Bind("LicenciaVehiculo") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tipo">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtTipo" runat="server" Text='<%# Bind("Tipo") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label5" runat="server" Text='<%# Bind("Tipo") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Servicio">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtServicio" runat="server" Text='<%# Bind("Servicio") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label5" runat="server" Text='<%# Bind("Servicio") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField HeaderText="Identity">
                        <EditItemTemplate>
                            <asp:TextBox ID="txtIdentity" runat="server" Text='<%# Bind("Identity.value") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lblIdentity" runat="server" Text='<%# Bind("Identity.value") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:CommandField ShowEditButton="True" />

                    <asp:CommandField ShowDeleteButton="True" />
                </Columns>
            </asp:GridView>
            <br />
            <h1>Nuevo VEHICULO</h1>
            <table>
                <tr>
                    <td>Vin:</td>
                    <td><asp:TextBox ID="txtNuevoVin" runat="server" MaxLength="100" Width="500px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Placa:</td>
                    <td><asp:TextBox ID="txtNuevoPlaca" runat="server"  MaxLength="100" Width="500px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Licencia:</td>
                    <td><asp:TextBox ID="txtNuevoLicencia" runat="server"  MaxLength="100" Width="500px"></asp:TextBox></td>
                </tr>
                <tr>
                    <td>Tipo:</td>
                    <td>
                        <asp:DropDownList ID="txtNuevoTipo" runat="server">
                            <asp:ListItem>AUTOMÓVIL</asp:ListItem>
                            <asp:ListItem>MOTOCICLETA</asp:ListItem>
                        </asp:DropDownList>
                        <%--<asp:TextBox ID="txtNuevoTipo" runat="server"  MaxLength="100" Width="500px"></asp:TextBox>--%>
                    </td>
                </tr>
                <tr>
                    <td>Servicio:</td>
                    <td>
                        <asp:DropDownList ID="txtNuevoServicio" runat="server">
                            <asp:ListItem>Particular</asp:ListItem>
                            <asp:ListItem>Público</asp:ListItem>
                        </asp:DropDownList>
                        <%--<asp:TextBox ID="txtNuevoServicio" runat="server"  Max  Length="100" Width="500px"></asp:TextBox>--%>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button ID="btnGuardar" runat="server" onclick="btnGuardar_Click" Text="Guardar" />
                    </td>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>
